--       _________ __                 __                               
--      /   _____//  |_____________ _/  |______     ____  __ __  ______
--      \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
--      /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \ 
--     /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
--             \/                  \/          \//_____/            \/ 
--  ______________________                           ______________________
--			  T H E   W A R   B E G I N S
--	   Stratagus - A free fantasy real time strategy game engine

--  fonts.lua - Fonts
--
--  (c) Copyright 2005 by Kimmo Merikivi
--
--  This program is free software; you can redistribute it and/or modify
--  it under the terms of the GNU General Public License as published by
--  the Free Software Foundation; either version 2 of the License, or
--  (at your option) any later version.
-- 
--  This program is distributed in the hope that it will be useful,
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--  GNU General Public License for more details.
-- 
--  You should have received a copy of the GNU General Public License
--  along with this program; if not, write to the Free Software
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------

CFont:New("small", CGraphic:New("ui/fonts/small.png", 7, 6))
CFont:New("game", CGraphic:New("ui/fonts/game.png", 14, 14))
CFont:New("large", CGraphic:New("ui/fonts/large.png", 17, 17))
CFont:New("small-title", CGraphic:New("ui/fonts/large.png", 17, 17))
CFont:New("large-title", CGraphic:New("ui/fonts/large.png", 17, 17))
--CFont:New("user1", CGraphic:New("ui/fonts/very_big.png", 28, 26))
--[[
DefineFont({
	Name = "small",
	File = "graphics/ui/fonts/small.png",
	Size = {7, 6}})
DefineFont({
	Name = "game",
	File = "graphics/ui/fonts/game.png",
	Size = {14, 14}})
DefineFont({
	Name = "large",
	File = "graphics/ui/fonts/large.png",
	Size = {17, 17}})
DefineFont({
	Name = "small-title",
	File = "graphics/ui/fonts/large.png",
	Size = {17, 17}})
DefineFont({
	Name = "large-title",
	File = "graphics/ui/fonts/large.png",
	Size = {17, 17}})
DefineFont({
	Name = "user1",
	File = "graphics/ui/fonts/very_big.png",
	Size = {26, 28}})
--]]


function DefineFontColor(id, t)
  fc = CFontColor:New(id)
  for i = 0,(table.getn(t) / 3 - 1) do
    fc.Colors[i] = CColor(t[i * 3 + 1], t[i * 3 + 2], t[i * 3 + 3])
  end
end

DefineFontColor("black", 
	{ 0,  0,  0,	
	40, 40, 60,	
	40, 40, 60,	
	40, 40, 60,	
	40, 40, 60,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("red",
	{ 0,  0,  0,	
	164,  0,  0,	
	124,  0,  0,	
	92,  4,  0,	
	68,  4,  0,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("green",
	{ 0,  0,  0,	
	44, 180, 148,	
	44, 180, 148,	
	44, 180, 148,	
	44, 180, 148,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("yellow",
	{ 252, 248, 240,	
	244, 224, 32,	
	208, 192, 28,	
	168, 140, 16,	
	92, 48,  0,	
	0,  0,  0,	
	108, 108, 108})	
DefineFontColor("blue",
	{ 0,  0,  0,	
	0, 148, 252,	
	0, 148, 252,	
	0, 148, 252,	
	0, 148, 252,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("magenta",
	{ 0,  0,  0,	
	152, 72, 176,	
	152, 72, 176,	
	152, 72, 176,	
	152, 72, 176,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("cyan",
	{ 0,  0,  0,	
	248, 140, 140,	
	248, 140, 140,	
	248, 140, 140,	
	248, 140, 140,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("white",
	{ 0,  0,  0,	
	252, 248, 240,	
	252, 248, 240,	
	252, 248, 240,	
	108, 108, 108,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("grey",
	{ 0,  0,  0,	
	192, 192, 192,	
	180, 180, 180,	
	168, 168, 168,	
	108, 108, 108,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("light-red",
	{ 0,  0,  0,	
	164,  0,  0,	
	164,  0,  0,	
	164,  0,  0,	
	164,  0,  0,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("light-green",
	{ 0,  0,  0,	
	44, 180, 148,	
	44, 180, 148,	
	44, 180, 148,	
	44, 180, 148,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("light-yellow",
	{ 252, 248, 240,	
	244, 224, 32,	
	208, 192, 28,	
	168, 140, 16,	
	92, 48,  0,	
	0,  0,  0,	
	108, 108, 108})	
DefineFontColor("light-blue",
	{ 0,  0,  0,	
	0, 148, 252,	
	0, 148, 252,	
	0, 148, 252,	
	0, 148, 252,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("light-magenta",
	{ 0,  0,  0,	
	152, 72, 176,	
	152, 72, 176,	
	152, 72, 176,	
	152, 72, 176,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("light-cyan",
	{ 0,  0,  0,	
	248, 140, 20,	
	248, 140, 20,	
	248, 140, 20,	
	248, 140, 20,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("light-grey",
	{ 0,  0,  0,	
	192, 192, 192,	
	180, 180, 180,	
	168, 168, 168,	
	108, 108, 108,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("violet",
	{ 0,  0,  0,	
	152, 72, 176,	
	152, 72, 176,	
	152, 72, 176,	
	152, 72, 176,	
	0,  0,  0,	
	0,  0,  0})	
DefineFontColor("orange",
	{ 0,  0,  0,	
	248, 140, 20,	
	248, 140, 20,	
	248, 140, 20,	
	248, 140, 20,	
	0,  0,  0,	
	0,  0,  0})
